package com.guoning.office_system.mapper;

import com.guoning.office_system.model.Message;
import com.guoning.office_system.vo.Criteria;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("MessageMapper")
public interface MessageMapper {
    List<Message> selectByQueryCondition(Criteria criteria);

    Long selectCountByQueryCondition(Criteria criteria);

    int updateAllMessageByUserId(Long userId);

    int updateMessageStatusById(List<Message> list);

    int updateDeleteById(List<Message> list);

    Message selectDraftByUserId(Long userId);

    int deleteByPrimaryKey(Long id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKeyWithBLOBs(Message record);

    int updateByPrimaryKey(Message record);
}